﻿package net.jejer.autoproxy2pac3;

import com.google.appengine.api.datastore.Key;
import com.google.appengine.api.datastore.Text;

import javax.jdo.annotations.IdGeneratorStrategy;
import javax.jdo.annotations.PersistenceCapable;
import javax.jdo.annotations.Persistent;
import javax.jdo.annotations.PrimaryKey;

@PersistenceCapable
public class PacData {
    @PrimaryKey
    @Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY)
    private Key key;

    @Persistent
    private String type;

    @Persistent
    private String modify;

    @Persistent
    private Text content;

    @Persistent
    private int length;
    
    public PacData(String type, String modify, String content, int length) {
        this.type = type;
        this.content = new Text(content);
        this.modify = modify;
        this.length = length;
    }

    public Key getKey() {
        return key;
    }

    public String getType() {
        return type;
    }

    public String getContent() {
        return content.getValue();
    }
    
    public int getLength(){
    	return length;
    }

    public String getModify() {
        return modify;
    }
    
    public void setKey(Key k){
    	this.key = k;
    }

    public void setType(String type) {
    	this.type = type;
    }

    public void setContent(String content) {
        this.content = new Text(content);
    }
    
    public void setLength(int length){
    	this.length = length;
    }

    public void setDate(String modify) {
        this.modify = modify;
    }
}